package domain;

public enum OrderStatus {
	NEW(0), PARTIALLY_FILLED(1), FILLED(2), CANCELED(4),REJECTED(8);
	
	Integer integer;
	OrderStatus(Integer integer){
		this.integer = integer;
	}
	
	int value() {
		return integer;
	}
	public String toString(){
		return integer.toString();
	}
	public static TypeOfOrder parse(Integer value){
		for(TypeOfOrder val : TypeOfOrder.values()){
			if (val.value() == value) return val;
		}
		return null;
	}
}
